package com.ruoyi.community.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 社区帖子对象 community_post
 *
 * @author ruoyi
 * @date 2025-05-22
 */
public class CommunityPost extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * key
     */
    private Long id;

    /**
     * 帖子用户id
     */
    @Excel(name = "帖子用户id")
    private Long userId;

    /**
     * 帖子内容
     */
    @Excel(name = "帖子内容")
    private String content;

    /**
     * 发帖时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "发帖时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date postTime;

    /**
     * 评论数
     */
    @Excel(name = "评论数")
    private Long commentNumber;

    /**
     * 点赞数
     */
    @Excel(name = "点赞数")
    private Long goods;

    /**
     * 图片信息
     */
    @Excel(name = "图片信息")
    private String img;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setPostTime(Date postTime) {
        this.postTime = postTime;
    }

    public Date getPostTime() {
        return postTime;
    }

    public void setCommentNumber(Long commentNumber) {
        this.commentNumber = commentNumber;
    }

    public Long getCommentNumber() {
        return commentNumber;
    }

    public void setGoods(Long goods) {
        this.goods = goods;
    }

    public Long getGoods() {
        return goods;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getImg() {
        return img;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("content", getContent())
                .append("postTime", getPostTime())
                .append("commentNumber", getCommentNumber())
                .append("goods", getGoods())
                .append("img", getImg())
                .toString();
    }
}
